<template name="RocketSearch">
	{{#unless isActive}}
		{{#if error}}
			<div class="rocket-search-error">
				{{_ error}}
			</div>
		{{/if}}
	{{else}}
	<div class="rocket-search-tab list-view {{provider.key}}">
		{{#if provider.description}}
			<div class="title">
				<p>{{{_ provider.description}}}</p>
			</div>
		{{/if}}
		<div class="control rocket-search-input">
			<form class="search-form" role="form">
				<div class="rc-input">
					<label class="rc-input__label">
						<div class="rc-input__wrapper">
							<div class="rc-input__icon">
								{{> icon block="rc-input__icon-svg" icon=provider.icon}}
							</div>
							<input value="{{text}}" type="text" class="rc-input__element" name="message-search" id="message-search" placeholder="{{_ 'Search_Messages'}}" autocomplete="off" aria-label="{{_ 'Search_Messages'}}" />
						</div>
					</label>
				</div>
				{{#if suggestions}}
				<div id="rocket-search-suggestions">
					{{#each suggestions}}
						<div class="rocket-search-suggestion-item {{suggestionSelected @index}}">
							{{> Template.dynamic template=provider.suggestionItemTemplate}}
						</div>
					{{/each}}
				</div>
				{{/if}}
			</form>
		</div>

		<div class="rocket-search-result">
			{{> Template.dynamic template=provider.resultTemplate data=scope}}
		</div>
	</div>
	{{/unless}}
</template>
